﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace ASKM.Rachao.Model.Dto
{
    public partial class InitialRegisterDto
    {

        #region Properties

        [Required(ErrorMessageResourceName = "Name_Required", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation)),
            MaxLength(50, ErrorMessageResourceName = "Name_Invalid", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation))
        ]        
        public String Name { get; set; }

        [Required(ErrorMessageResourceName = "Lastname_Required", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation)),
            MaxLength(50, ErrorMessageResourceName = "Lastname_Invalid", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation))
        ]        
        public String Lastname { get; set; }

        [Required(ErrorMessageResourceName = "Email_Required", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation)),
            MaxLength(100, ErrorMessageResourceName = "Email_Invalid", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation)),
            RegularExpression(@"^[-+.\w]{1,64}@[-.\w]{1,64}\.[-.\w]{2,6}$", ErrorMessageResourceName = "Email_Invalid", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation))    
        ]        
        public String Email { get; set; }

        [Required(ErrorMessageResourceName = "Password_Required", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation)),
            MaxLength(16, ErrorMessageResourceName = "Password_Invalid", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation)),
            RegularExpression(@"^\w{8,}$", ErrorMessageResourceName = "Password_Invalid", ErrorMessageResourceType = typeof(ASKM.Rachao.Resources.Model.Validation))
        ]        
        public String Password { get; set; }

        #endregion

    }
}
